<!DOCTYPE html>
<html>
<head>
    <include file="public/public_css" />
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

    <include file="public/header-min" />
    <!-- Left side column. contains the logo and sidebar -->
    <include file="public/left" />
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
               微信管理
                <a href="javascript:void(0);" ><small>添加微信</small></a>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i>首页</a></li>
                <li class="active">微信管理</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <!-- Small boxes (Stat box) -->
            <div class="row">
                <form id="myForm" class="form-horizontal">
                    <div class="form-group">
                        <label for="input1" class="col-sm-2 control-label">*URL(服务器地址)</label>
                        <div class="col-sm-10">
                            <input id="input1" class="form-control" value="{$Think.WX_PATH}" type="text"  placeholder="URL(服务器地址)" disabled>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input2" class="col-sm-2 control-label">*Token</label>
                        <div class="col-sm-10">
                            <input id="input2" class="form-control" name="w_token" type="text"    placeholder="Toke">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input3" class="col-sm-2 control-label">*公众号名称</label>
                        <div class="col-sm-10">
                            <input id="input3" class="form-control" name="wxname" type="text"   placeholder="公众号名称">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input4" class="col-sm-2 control-label">*公众号原始ID值</label>
                        <div  class="col-sm-10">
                            <input id="input4"  class="form-control" name="wxid" type="text" placeholder="公众号原始ID值">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input5" class="col-sm-2 control-label">*微信号</label>
                        <div  class="col-sm-10">
                            <input id="input5"  class="form-control" name="weixin" type="text" placeholder="微信号">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input6" class="col-sm-2 control-label">*AppID</label>
                        <div  class="col-sm-10">
                            <input id="input6"  class="form-control" name="appid" type="text" placeholder="AppID">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="input7" class="col-sm-2 control-label">*AppAppsecret</label>
                        <div  class="col-sm-10">
                            <input id="input7"  class="form-control" name="appsecret" type="text" placeholder="AppSecret">
                        </div>
                    </div>
                    <select  id="input0" class="form-control" name="type" >
                        <option value="1" selected>订阅号</option>
                        <option value="2" >认证订阅号</option>
                        <option value="3" >服务号</option>
                        <option value="4" >认证服务号</option>
                    </select>
                    <div class="add-is-show">
                        <label class="radio-inline">
                            <input id="inlineRadio1" name="wait_access" type="radio"  value="0" checked> 等待接入
                        </label>
                        <label class="radio-inline">
                            <input  id="inlineRadio2" name="wait_access" type="radio" value="1"> 已接入
                        </label>
                    </div>
                    <div class="menu_btn">
                        <button  type="submit" class="btn btn-success" >提交</button>
                    </div>
                </form>
            </div>
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
    <include file="public/footer" />

    <!-- Control Sidebar -->

    <!-- /.control-sidebar -->
    <!-- Add the sidebar's background. This div must be placed
         immediately after the control sidebar -->
    <div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->

<include file="public/public_js" />
<script src="__PUBLIC__/static/js/jquery.form.js"></script>
<script>
    $('#myForm').submit(function () {
        $(this).ajaxSubmit({
            type : 'POST', //GET,POST
            url: '{$Think.WEB_PATH}/Admin/wei_xin/addWeiXin',
            dataType : 'json', //xml,json,script，默认为null
            resetForm : true, //成功提交后，重置表单
            success : function (data) {
                layer.open({
                    type: 1,
                    time: 1000,
                    area: ['200px', '200px'],
                    content: data.msg //服务器返回的消息
                });
            },
            error : function (event, errorText, errorType) { //错误时调用
                alert(errorText + errorType);
            }
        });
        return false;
    });
</script>
</body>
</html>
